import React, { useEffect, useState } from 'react';
import { getHomeDetailOrder } from '@/api/request'
import HomeDetailBanner from '@/components/HomeDetailBanner';
import SaleDetail from '@/components/SaleDetail';

const HomeOrder = () => {
    const [banners, setBanners] = useState([])
    const [detail, setDetail] = useState([])
    useEffect(() => {
        (async () => {
            let { data } = await getHomeDetailOrder()
            setBanners(data)
            setDetail(data)
        })()
    })
    return (
        <>
            <HomeDetailBanner banners={banners} />
            <SaleDetail detail={detail} />
        </>
    );
};

export default HomeOrder;